#ifndef _TYPE_
#include <type.h>
#endif
/*This file includes the absolutely generalized driver interface
that will be provided to all the assistant hardware code in the
kernel. It is expected to introduce some system and organization
in the management of drivers and will be an improvement over
simply calling the hardware code. In addition to this the
driver interface will also maintain statistical data concerned
with the drivers that will be useful primarily for
debugging purposes. The driver interface includes a database
for registration of all the driver structures also and hence
will also include display functions exclusively for debugging
purposes */

#define MAX_CHILD 10

typedef struct {
	u32 global_id;
	char name[20];
	u64 uptime;
	int failures;
	int (*init)();
	int (*reset)();
	int (*deinit)();
	u32 (*select_subdevice)(u32 dev);
	u32 (*read_char)(u32 endpoint);
	u32 (*read_block)(void *buf,u32 endpoint,u32 count);
	u32 (*write_char)(u32 endpoint,u32 d);
	u32 (*write_block)(void *buf,u32 endpoint,u32 count);
}kdrv;

static struct reg_drv	{
	kdrv *driver;
	struct reg_drv *next;
}*head;
